import { request } from "@/utils/service"

/** 增 */
export function addSysAuthorityRoute(data: any) {
  return request({
    url: "/sysRole/insertOrUpdate",
    method: "post",
    data:[data]
  })
}

/** 删 */
export function delSysAuthorityRoute(data: any) {
  return request({
    url: `/sysRole/deleteByIds`,
    method: "post",
    data
  })
}


/** 查 */
export function getSysAuthorityRoute(params:any) {
  return request<any>({
    url:'/sysRole/selectAll',
    method:'post',
    data:params
  })
}

/** 获取所有路由 */
export function getRouterList(params:any) {
  return request<any>({
    url:'/sysAuthorityRoute/getAllAuthorityRoute',
    method:'get',
    params
  })
}

/** 获取所有系统角色信息 */
export function getAllRole(params:any) {
  return request<any>({
    url:'/sysRole/getAllRole',
    method:'get',
    params
  })
}
